/*
 *  testExec.c
 *  
 *	Test for running two processes. Will attempt to run two of the test
 *	kernelLock executables.
 *
 */

#include "syscall.h"

/* This test will show that we can execute multiple user programs. In this main function,
 * we will execute 10 instances of the testKernelCondition userprogram. This no only shows
 * that the multiprogramming is set up correctly, but it also shows that the kernel conditions
 * are actually storing the addrspace so that other programs can't access conditions that 
 * are not within its addrspace. This test purposefully makes too many exec calls so the
 * addrspace will not try to create an addrspace for a process that cannot fit.
 */
int main()
{
	Exec("..//test//testKernelCondition", sizeof("..//test//testKernelCondition"));
	Exec("..//test//testKernelCondition", sizeof("..//test//testKernelCondition"));
	Exec("..//test//testKernelCondition", sizeof("..//test//testKernelCondition"));
	Exec("..//test//testKernelCondition", sizeof("..//test//testKernelCondition"));
	Exec("..//test//testKernelCondition", sizeof("..//test//testKernelCondition"));
	Exec("..//test//testKernelCondition", sizeof("..//test//testKernelCondition"));
	Exec("..//test//testKernelCondition", sizeof("..//test//testKernelCondition"));
	Exec("..//test//testKernelCondition", sizeof("..//test//testKernelCondition"));
	Exec("..//test//testKernelCondition", sizeof("..//test//testKernelCondition"));
	Exec("..//test//testKernelCondition", sizeof("..//test//testKernelCondition"));
	Exit(0);
}

